<!DOCTYPE html>
<HTML>
<HEAD><meta name="viewport" content="width=device-width, initial-scale=1">
<Title>BaseChart.layout</Title>
<link type='text/css' rel='Stylesheet' href="maxchartapi.css" />
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">

<p class="heading0">ChartDirector 7.0 (Java Edition)</p>
<p class="heading1"><a href="BaseChart.htm">BaseChart</a>.<wbr>layout</p>
<hr class="separator">
<p class="heading2a">Usage</p>
<div class="content">
public void layout()
</div>
<p class="heading2">Description</p>
<div class="content">
Perform auto-scaling of the axes (if any) and compute the positions of the various objects in the chart.<br><br>
ChartDirector automatically lays out the chart when creating the chart output (eg. using <a href="BaseChart.makeSession.htm">BaseChart.makeSession</a>, <a href="BaseChart.makeChart.htm">BaseChart.makeChart</a> or <a href="BaseChart.makeChart2.htm">BaseChart.makeChart2</a>). There is usually no need to layout explicitly.<br><br>
However, if you would like to draw custom objects whose positions depend on the axis scales or the position of other objects, you may call the layout method to auto-scaling the axes (for charts that have axes) and to fix the positions of chart objects before creating the chart output.<br><br>
You should not modify the positions of existing chart objects or add more data to the chart after layout.<br><br>
Note that there is a similar method <a href="BaseChart.layoutLegend.htm">BaseChart.layoutLegend</a> that lays out the legend box only. For <a href="XYChart.htm">XYChart</a> objects, there is a method <a href="XYChart.layoutAxes.htm">XYChart.layoutAxes</a> that lays out and auto-scales the axes only. They allow the legend box size, axis scale, and axis thickness to be known without fixing the positions of all chart objects.
</div>
<p class="heading2">Arguments</p>
<div class="content">None</div>
<p class="heading2">Return Value</p>
<div class="content">
None
</div>
<br><hr class="separator">
<div class="copyright">&copy; 2022 Advanced Software Engineering Limited. All rights reserved.</div>
</body>
</HTML>
